<div class="wrap">

	<a href="?module=BgcmsGallery&sub1=gallery">Gallery</a> -> <a href="?module=BgcmsGallery&sub1=gallery&amp;act=listphotos&galleryid={$LINK_PATH->gallery}">{$LINK_PATH->gallery_name}</a>
</div>

<div class="wrap">
{if $smarty.cookies.message != NULL}
	<div id="ajaxResponse1" class="ajaxResponse" style="display:block">{$smarty.cookies.message}</div>
{/if}
<h2>{if $smarty.get.act eq 'editphotos'}Edit{else}Add{/if} Photos</h2>
<form enctype="multipart/form-data" name="formphotos" id="formphotos" method="post" >
	<input type="hidden" name="act" value="{$smarty.get.act}" />
    <input type="hidden" name="gallery_id" value="{$smarty.get.galleryid}" />
    {if $smarty.get.act eq "editphotos"}
    <input type="hidden" name="photo_id" value="{$smarty.get.id}" />
    {/if}
	<table class="adminform" width="100%" cellspacing="2" cellpadding="5">
		<tr>
			<th width="33%" scope="row" valign="middle">
			{TranslateTag}B_LABEL_NAME{/TranslateTag}:</th>
			<td width="67%">
			<input name="name" id="name" type="text" value="{$PHOTO_ONE->name}" size="40" /></td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			Upload photo:</th>
			<td width="67%">
				<input type="file" name="photo" style="width:99%;"/><br />
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			</th>
			<td width="67%">
                <img src="../{$PHOTOS.path_thumb}{$PHOTO_ONE->path}" />
            </td>
		</tr>
		<tr>
			<th scope="row" valign="top">
			{TranslateTag}B_LABEL_DESCRIPTION{/TranslateTag}:</th>
			<td>
            	<textarea name="description" id="description" rows="5" cols="50" style="width: 90%;">{$PHOTO_ONE->description}</textarea>
            </td>
		</tr>
	</table>
	<p class="submit" align = "right">
		<input type="submit" name="submit" value="{if $smarty.get.act eq 'editphotos'}Edit{else}Add{/if} Photos &raquo;" />
	</p>
</form>

</div>